package com.burnerpat.fl2d.core.shape;

import com.burnerpat.fl2d.math.Vector2D;

public class Rectangle extends Shape
{
	private double width = 0.0;
	private double height = 0.0;
	
	public Rectangle(double pWidth, double pHeight)
	{
		super();
		
		width = pWidth;
		height = pHeight;
	}
	
	public Rectangle()
	{
		this(0.0, 0.0);
	}
	
	public double getWidth()
	{
		return width;
	}
	
	public void setWidth(double pWidth)
	{
		width = pWidth;
	}
	
	public double getHeight()
	{
		return height;
	}
	
	public void setHeight(double pHeight)
	{
		height = pHeight;
	}
	
	public void setDimensions(double pWidth, double pHeight)
	{
		width = pWidth;
		height = pHeight;
	}
	
	public Vector2D toVector2D()
	{
		return new Vector2D(width, height);
	}
	
	@Override
	public Rectangle getAABB()
	{
		return this;
	}
}
